package com.google.api.client.http;
public final class Preconditions {
  public static <T> T checkNotNull(T obj) {
    if (obj == null) {
      throw new NullPointerException();
    }
    return obj;
  }

  public static void checkArgument(boolean condition) {
    if (!condition) {
      throw new IllegalArgumentException();
    }
  }
  
  public static void checkState(boolean condition) {
    if (!condition) {
      throw new IllegalStateException();
    }
  }
}
